blob: 2c3bebcfccb6cb7d2b321372cb8d991b87494c14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import BasicLayout from '@/core/components/layouts/BasicLayout'
import IsAuth from '@/lib/auth/components/IsAuth'
import FinishCheckoutComponent from '@/lib/checkout/components/FinishCheckout'
import { useRouter } from 'next/router'
import axios from 'axios'
import Seo from '@/core/components/Seo'
export async function getServerSideProps(context) {
const { order_id } = context.query
await axios.post(
`${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/finish-checkout?orderName=${order_id}`,
{},
{ headers: context.req.headers }
)
return { props: {} }
}
export default function Finish() {
const router = useRouter()
return (
<>
<Seo title='Checkout Indoteknik.com' />
<IsAuth>
<BasicLayout>
<FinishCheckoutComponent query={router.query || {}} />
</BasicLayout>
</IsAuth>
</>
)
}
|